<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>

<div class="center" title="Total : <s:property value="pager.total"/>">

	<ul class="pagination pagination-small">

		<!-- PREVIOUS -->
		<s:if test="pager.previousEnable == true">
			<s:url var="previousUrl" namespace="%{pager.namespace}"
				action="%{pager.actionName}" escapeAmp="false">
				<s:param name="pageStart" value="%{pager.start - pager.size}" />
				<s:param name="pageSize" value="%{pager.size}" />
			</s:url>

			<li><s:a href="%{#previousUrl}">Prev</s:a></li>
		</s:if>
		<s:else>
			<li class="disabled"><a href="#">Prev</a></li>
		</s:else>

		<!-- PAGES -->
		<s:iterator var="counter" begin="1" end="%{pager.numberOfPages}"
			status="pageIndex">

			<s:url var="pageUrl" namespace="%{pager.namespace}"
				action="%{pager.actionName}" escapeAmp="false">
				<s:param name="pageStart" value="%{pager.size * #pageIndex.index}" />
				<s:param name="pageSize" value="%{pager.size}" />
			</s:url>

			<s:if test="pager.pageNumber == (#pageIndex.index + 1)">
				<li class="active">
			</s:if>
			<s:else>
				<li>
			</s:else>

			<s:a href="%{#pageUrl}">
				<s:property value="%{#pageIndex.index + 1}" />
			</s:a>
			</li>

		</s:iterator>

		<!-- NEXT -->
		<s:if test="pager.nextEnable == true">
			<s:url var="nextUrl" namespace="%{pager.namespace}"
				action="%{pager.actionName}" escapeAmp="false">
				<s:param name="pageSize" value="%{pager.size}" />
				<s:param name="pageStart" value="%{pager.start + pager.size}" />
			</s:url>
			<li><s:a href="%{#nextUrl}">Next</s:a></li>
		</s:if>
		<s:else>
			<li class="disabled"><a href="#">Next</a></li>
		</s:else>

	</ul>
</div>